decode token to get claims value

50

decode token to get claims value -

var token = "[encoded jwt]";  
var handler = new JwtSecurityTokenHandler();
var jwtSecurityToken = handler.ReadJwtToken(token);
var jti = tokenS.Claims.First(claim => claim.Type == "jti").Value;

decode token to get claims value -

var Token = "[encoded jwt]";  
 var handler = new JwtSecurityTokenHandler(); 
 var jwt = handler.ReadJwtToken(token);
 var Name = jwt.Claims.First(claim => claim.Type == "Name").Value;
 var User_Id = jwt.Claims.First(claim => claim.Type == "User_Id").Value;

Comments

Submit
0 Comments